package v1

import (
	"chazhou/app/user/srv/common"
	"chazhou/app/user/srv/internal/model/bo"
	"chazhou/app/user/srv/internal/model/entity"
	"context"
	"gorm.io/gorm"
)

// IUser 操作数据接口
type IUser interface {
	List(ctx context.Context) (list []entity.User, err error)
	PageList(ctx context.Context, user bo.PageUser) (list []entity.User, err error)
}

// User 实现操作数据接口
type User struct {
	db *gorm.DB
}

func (_ *User) List(ctx context.Context) (list []entity.User, err error) {
	return nil, nil
}

func (_ *User) PageList(ctx context.Context, user bo.PageUser) (list []entity.User, err error) {
	return nil, err
}

func NewUserDao() IUser {
	return &User{
		db: common.DB,
	}
	//return &mock.User{}
}
